package com.ljh.mboxvidoserver.main.service.impl;

import com.ljh.mboxvidoserver.main.dao.MenuRepository;
import com.ljh.mboxvidoserver.main.entity.Menu;
import com.ljh.mboxvidoserver.main.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MenuServiceImpl implements MenuService {

    @Autowired
    private MenuRepository menuRepository;

    @Override
    public List<Menu> findMenuList() {
        return menuRepository.findAll();
    }

    @Override
    public List<Menu> findMenuById(Integer id) {
        return null;
    }

    @Override
    public List<Menu> findMenuListByPid(Integer pid) {
        return menuRepository.findListByPid(pid);
    }
}
